/** 密封：
 *  + 不可以增加新的属性
 *  + 老的属性不可以删除
 *  + 但可以改值 */
let obj = {animal: 'cat'};
console.log(Object.isSealed(obj)); // false
console.log(Object.isExtensible(obj)); // true
console.log(Object.getOwnPropertyDescriptor(obj, 'animal')); // { value: 'cat', writable: true, enumerable: true, configurable: true }
Object.seal(obj);
console.log(Object.isSealed(obj)); // true
console.log(Object.isExtensible(obj)); // false
console.log(Object.getOwnPropertyDescriptor(obj, 'animal')); // { value: 'cat', writable: true, enumerable: true, configurable: false }

obj.animal = 'dog';
console.log(obj); //{ animal: 'dog' }
delete obj.name;
console.log(obj); //{ animal: 'dog' }
obj.age = 2;
console.log(obj); //{ animal: 'dog' }
